#include <iostream>
#include "gda.hpp"
using namespace std;

int main (int argc, char * const argv[]) {

	
	string video_path;
	string csv_path;
	string out_path;
	
	string basename;
	string object_type;
	float score_threshold = 0.50;
	
	if(argc==1)
	{		
		cout << "Running default test configuration for debug on Kris' MAC!" << endl;
		basename = "detection_sample_4";
		object_type = "person";
		string root = "/Users/kkitani/Dropbox/SharedWithOthers/mey2_data/";
		
		//detection_sample_3_tracks_smoothed.txt
		
		csv_path    = root + basename + "_tracks_smoothed.txt";
		out_path    =  root + basename + "_tracks_smoothed_"+ object_type +"_LTDA.txt";

		//csv_path    = root + basename + "_ObjectTracking_"+object_type+"_smoothed.txt";
		//out_path    =  root + basename + "_DataAssociation_"+ object_type +".txt";
		
		
		video_path  = root + basename+".mov";
	}
	else if(argc==5)
	{
		video_path = argv[1];
		csv_path = argv[2];
		out_path = argv[3];
		object_type = argv[4];
	}
	else if(argc==6)
	{
		video_path = argv[1];
		csv_path = argv[2];
		out_path = argv[3];
		object_type = argv[4];
		score_threshold = atof(argv[5]);
	}
	else {
		cout << "Usage:./gda [video] [csv] [output] [object] (optional):[score_thresh]" << endl;
		exit(1);
	}
	
	gda my_gda;
	my_gda.run_gda(video_path,csv_path,out_path, object_type, score_threshold);
	
	return 0;
}
